
import { createStore } from "vuex";
import Cookies from 'js-cookie'
let userInfo = 'Admin-UserInfo'
let store = createStore({
  state: {
    userInfo:  Cookies.get(userInfo)?JSON.parse(Cookies.get(userInfo)):  {},
  },
  mutations: {
    // 设置用户信息
    setUser(state,val){
      state.userInfo = val
    },

  }


});

export default store;
